package org.darcy.controller.index;

import org.darcy.entity.work.WorkTask;
import org.darcy.framework.model.R;
import org.darcy.service.work.WorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;

@Tag(name = "首页统计接口")
@RestController
@RequestMapping("/index")
@Slf4j
public class IndexController {

	@Autowired
	private WorkService WorkService;

	@Operation(summary = "首页任务统计")
	@GetMapping(value = "getSummary")
	public R getSummary(String keyword) {
		WorkTask data = WorkService.getSummary();
		return R.ok("首页任务统计获取成功").data(data);
	}

}
